<?php
/*
 * ---------------------------------------------------------------
 * SETUP OUR PATH CONSTANTS
 * ---------------------------------------------------------------
 *
 * The path constants provide convenient access to the folders
 * throughout the application. We have to setup them up here
 * so they are available in the config files that are loaded.
 */

/**
 * The path to the main application directory. Just above public.
 */
define('ROOTPATH',  __DIR__.DIRECTORY_SEPARATOR);

/**
 * The path to the application directory.
 */
define('APPPATH', ROOTPATH."App".DIRECTORY_SEPARATOR);

/**
 * The path to the system directory.
 */
define('BASEPATH', ROOTPATH."Framework".DIRECTORY_SEPARATOR);

/**
 * The path to the writable directory.
 */
define('WRITEPATH', ROOTPATH . "Runtime/" .DIRECTORY_SEPARATOR);

/*
 * ---------------------------------------------------------------
 * GRAB OUR CONSTANTS & COMMON
 * ---------------------------------------------------------------
 */
$config = require APPPATH. 'Config/app.php';


include "Loader.php";
$loader = new Autoload\Loader();
$loader->register();
$loader->addPrefix("Framework","Framework");
$loader->addPrefix("App","App");
$loader->addDirectory("Libraries");
echo "<pre>";


$app = new \Framework\Application($config);
//$my = new \MyClass();
//$my->dump();
//$app = new Framework\App("App");
$app->initialize();
$app->run();
die;


